<script setup lang="ts">
function add(x:number,y:number):number{
  alert(x+y);
  return x+y;
}
let  add2 = (x:number,y:number):number =>{
  alert(x*2+y*2);
  return x+y
}
</script>

<template>
  <main>
   <h1>TypeScript学习</h1>
   <button @click="add(5,9)">add</button>
   <button @click="add2(3,4)">add2</button>
   
    
  </main> 
</template>

